def line(year,month, day):
    months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 173, 304, 334]
    if 0 <month <= 12:
        num = months[month-1]

    if ((year % 4 == 0 and year % 100 != 0 ) or year % 400 == 0):
        if month > 2:
            num += 1
    else:
        num = num

    number = num + day
    print(number)
line(2019,3,20)